package com.example.tab04;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class TabFragment extends Fragment {

	private int pos;
	public TabFragment(int pos) {
		this.pos = pos;
	}
	
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
		Bundle savedInstanceState) {
	View view = inflater.inflate(R.layout.fragment, container, false);
	TextView mTextView = (TextView) view.findViewById(R.id.nameTv);
	mTextView.setText(TabAdapter.TITLES[pos]);   //每个Fragment的TextView显示字串
	return view;
}

}
